package com.situ.mall.admin.task;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.annotation.Schedules;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component

//cleanTask.clean()
public class CleanTask {
    //cron表达式
    @Scheduled(cron = "0/10 * * * * ?")
    public void clean() {
              //查attachment表中的无效数据

        //不要获取但当前登录用户

        //遍历

        //把对应的文件删除
        //数据也删除
        System.out.println(new Date()+"--模拟删除数据");
    }
}
